package sg.edu.nus.iss.stockex;

public class LinearRegression {
	public String code;
	public String date;
	public double slope;
	public double intercept;
	
	public LinearRegression(String code, String date, double slope,
			double intercept) {
		super();
		this.code = code;
		this.date = date;
		this.slope = slope;
		this.intercept = intercept;
	}
	
	public LinearRegression(String strLine) {
		super();
		String [] words = strLine.split("\t");
		
		this.code = words[0].trim();
		this.date = words[1].trim();
		this.slope = Double.parseDouble(words[2].trim());
		this.intercept = Double.parseDouble(words[3].trim());
	}
	
	public String getCode() {
		return code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	public String getDate() {
		return date;
	}
	public void setDate(String date) {
		this.date = date;
	}
	public double getSlope() {
		return slope;
	}
	public void setSlope(double slope) {
		this.slope = slope;
	}
	public double getIntercept() {
		return intercept;
	}
	public void setIntercept(double intercept) {
		this.intercept = intercept;
	}
	
}
